home *** CD-ROM | disk | FTP | other *** search
/ FishMarket 1.0 / FishMarket v1.0.iso / fishies / 001-025 / disk_013 / amiga-copy.bas < prev    next >
BASIC Source File  |  1992-05-06  |  11KB  |  274 lines

  1. 1     goto 110
  2. 2     rem
  3. 3     rgb 1,15,0,0
  4. 4     print at (33,0);"Amiga Copy"
  5. 5     print at (19,3);"Courtesy of Phase 4 Distributors Inc."
  6. 10    print at (30,5);"By: ";inverse(1)"Graeme Earle"
  7. 11    print at (34,6);"Nov 25/85"
  8. 12    sp$="amiga copy by Grayem Earle   Courtessy of Phase Four Distributors Inc.!" : gosub 181
  9. 15    print at (10,8);"This is a simple utilities program for the Amiga"
  10. 16    print at (10,9);"If you are going to be using the one drive file"
  11. 17    print at (10,10);"copier I would recommend installing workbench"
  12. 18    print at (10,11);"into Ram, so you don't have to keep putting in the"
  13. 19    print at (10,12);"workbench disk all the time. Also you need to know"
  14. 20    print at (10,13);"the name of the source and destination disks.
  15. 21    print at (14,14);"You can find these out through Workbench."
  16. 22    print at (10,16);"This program has speech built into it, if you do not"
  17. 23    print at(10,17);"want the speech, hit the ";inverse(1)"S";inverse(0)" key, or hit any other key to continue"
  18. 25    rem    
  19. 30    get tk$ : if tk$ = "" then 30
  20. 33    if tk$ = "s" or tk$ = "S" then tk = 1 else tk = 0
  21. 35    rem
  22. 37    rem
  23. 39    rem
  24. 89    sleep 1000000
  25. 99    goto 150
  26. 100   rem setup error routine
  27. 110   screen 1,3,4
  28. 120   rgb 0,0,0,0
  29. 130   rgb 1,0,0,0 
  30. 140   rgb 2,15,15,14
  31. 145   goto 2
  32. 150   on error goto 190
  33. 160   d$ = "df0:"
  34. 165   ch$ = "cd " + d$
  35. 167   shell ch$
  36. 170   dim a$(100),cop$(100),del$(100)
  37. 180   goto 790
  38. 181   if tk = 1 then return
  39. 182   tt$ = translate$(sp$)
  40. 183   ttt% = narrate(tt$)
  41. 184   return
  42. 190   rem error comes here
  43. 200   if err = 53 and erl = 230 then close #1
  44. 210   if err = 53 and erl = 230 then shell "dir >ddirfile" : resume 220
  45. 215   scnclr : print "System Error" : sleep 1000000: resume 790
  46. 220   rem open directory as a file
  47. 230   open "I", #1, "ddirfile"
  48. 240   i = 1
  49. 250   while not eof(1)
  50. 260   input #1,n$
  51. 270   gosub 350
  52. 280   i = i + 1
  53. 290   if mid$(n$,34) = "" then 320
  54. 300   a$(i) = mid$(n$,34)
  55. 310   i = i + 1
  56. 320   wend : close #1
  57. 330   ct = i - 1
  58. 340   return
  59. 350   rem check for blanks
  60. 360   sp = 0
  61. 370   for q = 1 to len(n$)
  62. 380   k = q
  63. 390   if mid$(n$,q,1) = " " then sp = sp + 1 else sp = 0
  64. 400   if sp = 3 then 420
  65. 410   next q
  66. 420   kk = q - sp : a$(i) = left$(n$,kk)
  67. 430   return
  68. 440   rem main copy part
  69. 445   rem gosub 1220
  70. 450   scnclr
  71. 459   sp$ = "file copier!" : gosub 181
  72. 460   print at (34,0);inverse(1) "File Copier"
  73. 470   print at (29,2);inverse(1)"C)";inverse(0)"opy,"
  74. 471   print at (36,2);inverse(1)"N)";inverse(0)"ext, or "
  75. 472   print at (46,2);inverse(1)"D)";inverse(0)"one"
  76. 479   if val(m$) = 2 then 613
  77. 480   chdir "df0:"
  78. 485   gosub 220
  79. 490   m = 0
  80. 500   i = 0 : p = 0
  81. 510   i = i + 1: if i > ct then 760
  82. 520   p = p + 1
  83. 530   print at (5,8); "                                              "
  84. 540   print at (5,8); a$(i); at (33,8); inverse(1); "c/n/d"
  85. 550   get do$ : if do$ = "" then 550
  86. 560   if i = ct then 610
  87. 570   if do$ = "n" then 510
  88. 580   if do$ = "d" then 610
  89. 590   if do$ = "c" then cop$(m+1) = a$(i) : m = m + 1 : goto 510
  90. 600   i = i - 1 : p = p - 1 : goto 550
  91. 610   if m = 0 then 760
  92. 611   if val(m$) = 3 then 639
  93. 612   if val(m$) = 2 then 620
  94. 613   shell "makedir ram:z" : sp$ = "one drive file copier!" : gosub 181
  95. 614   print at (29,0) ; inverse(1) "One drive file copier" : sp$ = "type in
  96. 615   print at (5,5); "Type in the name of your source disk"
  97. 616   print at (21,6);"                             "
  98. 617   print at (5,6); "Use the format ";inverse(1) "name: ";
  99. 618   input ds$ : l = len(ds$) : if mid$(ds$,l) <> ":" then 616
  100. 619   shell "cd " + ds$ : goto 480
  101. 620   print at (5,10); "Type in the name of the destination disk"
  102. 621   print at (21,11);"                         " : sp$ = "type in the name
  103. 622   print at (5,11); "Use the format ";inverse(1) "name: ";
  104. 623   input dd$ : l = len(dd$) : if mid$(dd$,l) <> ":" then 620
  105. 624   for z = 1 to m
  106. 625   g1$ = "copy " + ds$ +cop$(z) + " ram:z"
  107. 626   g2$ = "copy ram:z/" + cop$(z) + " to " + dd$
  108. 627   shell g1$
  109. 628   shell g2$
  110. 629   g3$ = "delete ram:z/" + cop$(z)
  111. 630   shell g3$
  112. 637   next z
  113. 638   shell "delete " + ds$ + "ddirfile" : shell "delete ram:z" : goto 770
  114. 639   sp$ = "copying files." : gosub 181
  115. 640   scnclr : print at (30,0);inverse(1) "Copying Files"
  116. 641   sp$ = "insert destination disk." : gosub 181
  117. 642   print at (25,2); "Insert destination disk in drive #";v
  118. 644   sp$ = "hit the left mouse butten when ready." : gosub 181
  119. 650   print at (25,4); "Hit the left mouse button when ready"
  120. 660   ask mouse j%,k%,l%
  121. 670   if l% = 4 then 690 else 660
  122. 680   ? l%
  123. 690   for z = 1 to m
  124. 700   go$ = "copy df0:" + cop$(z) + " to df1:" + cop$(z)
  125. 710   shell go$
  126. 720   print at (5,8); "                                              "
  127. 725   sp$ = "copied okay." : gosub 181
  128. 730   print at (5,8); cop$(z); at (5,20); "copied ok"
  129. 740   sleep 100000
  130. 750   next z
  131. 760   scnclr : sp$ = "copy completed." : gosub 181
  132. 770   print at (30,20);inverse(1) "Copy Completed"
  133. 780   shell "df0:ddirfile"
  134. 790   rem main menu
  135. 795   rgb 1,15,15,0
  136. 800   scnclr
  137. 805   sp$ = "amiga utillities!" : gosub 181
  138. 810   print at (35,0);inverse(1) "Amiga Utilities"
  139. 820   print at (5,4);inverse(1) "1)";inverse(0)" Install Workbench into RAM"
  140. 830   print at (5,6);inverse(1) "2)";inverse(0)" Copy Files using one drive"
  141. 840   print at (5,8);inverse(1) "3)";inverse(0)" Copy Files using two drives"
  142. 870   print at (5,10);inverse(1) "4)";inverse(0)" Delete Files"
  143. 880   print at (5,12);inverse(1) "5)";inverse(0)" Send a file to printer"
  144. 890   print at (5,14);inverse(1) "6)";inverse(0)" Directory"
  145. 900   print at (5,16);inverse(1) "7)";inverse(0)" Exit to basic"
  146. 910   print at (35,22); inverse(1) "Type in your choice";
  147. 915   sp$ = "type in your choice please!" : gosub 181
  148. 920   get m$ : if m$ = "" then 920
  149. 925   on val(m$) goto 1030,440,440,1670,2070,1930,2240
  150. 926   if val(m$) < 1 or val(m$) > 7 then 915
  151. 1030  rem workbench into ram
  152. 1040  scnclr
  153. 1045  sp$ = "installing workbench into ram!" : gosub 181
  154. 1050  print at (25,0);inverse(1) "Installing Workbench into RAM"
  155. 1060  print at (5,5); " I would not recommend this unless you have the extra memory"
  156. 1065  sp$ = "do you want to continue on ?" : gosub 181
  157. 1070  print at (5,7); "Do you want to continue on (y/n) ";
  158. 1080  get y$ : if y$ = "" then 1080
  159. 1090  if y$ = "n" or y$ = "N" then 790
  160. 1100  if y$ = "y" or y$ = "Y" then 1120
  161. 1110  goto 1065
  162. 1120  rem do it here
  163. 1130  scnclr
  164. 1140  rem ram it
  165. 1141  shell "makedir ram:c"
  166. 1142  shell "copy c/assign ram:c"
  167. 1143  shell "copy c/cd ram:c"
  168. 1144  shell "copy c/delete ram:c"
  169. 1145  shell "copy c/makedir ram:c"
  170. 1146  shell "copy c/break ram:c"
  171. 1147  shell "copy c/copy ram:c"
  172. 1148  shell "copy c/dir ram:c"
  173. 1149  shell "copy c/failat ram:c"
  174. 1150  shell "copy c/stack ram:"
  175. 1151  shell "copy c/fault ram:c"
  176. 1152  shell "copy c/break ram:c"
  177. 1153  shell "copy c/run ram:c"
  178. 1154  shell "assign c: ram:c"
  179. 1180  scnclr
  180. 1185  sp$ = "ram disk installed!" : gosub 181
  181. 1190  print at (30,0); inverse(1) "RAM disk installed"
  182. 1200  sleep 1000000
  183. 1210  goto 790
  184. 1220  rem set current directory
  185. 1230  scnclr
  186. 1235  sp$ = "current directory is set at " + d$ : gosub 181
  187. 1240  print at (5,0); "Current directory set at ";d$
  188. 1245  sp$ = "do you wish to change the directory?" : gosub 181
  189. 1250  print at (5,5); "Do you wish to change the directory (y/n) ";
  190. 1260  get y$: if y$ = "" then 1260
  191. 1270  if y$ = "n" or y$ = "N" then sleep 1000000: return
  192. 1280  if y$ = "y" or y$ = "Y" then goto 1300
  193. 1290  goto 1250
  194. 1295  print at (5,8) ; "                                                "
  195. 1296  sp$ = "type in the new directory name" : gosub 181
  196. 1300  print at (5,8); "Type in the new directory name ";
  197. 1310  input d$
  198. 1315  if d$ = "df0:" or d$ = "DF0:" or d$ = "df1:" or d$ = "DF1:" then 1320 else 1295
  199. 1320  ch$ = "cd " + d$
  200. 1322  shell ch$
  201. 1325  sp$ = "directory changed to " + d$ : gosub 181
  202. 1330  print at (5,15); "Directory changed to ";d$
  203. 1340  sleep 1000000 : return
  204. 1670  rem delete files.......
  205. 1675  gosub 1220
  206. 1680  scnclr : sp$ = "delete files." : gosub 181
  207. 1690  print at (35,0) ;inverse(1) "Delete Files"
  208. 1700  gosub 220
  209. 1702  sp$ = "d to delete     n for next   or e to exit " : gosub 181
  210. 1705  print at (30,2);inverse(1)"D)";inverse(0)"elete,"
  211. 1707  print at (38,2);inverse(1)"N)";inverse(0)"ext, or "
  212. 1709  print at (49,2);inverse(1)"E)";inverse(0)"xit"
  213. 1720  for del = 1 to ct
  214. 1730  print at (5,8); "                                                 "
  215. 1740  print at (5,8); a$(del); at (33,8); inverse (1); "d/n/e"
  216. 1750  get y$ : if y$ = "" then goto 1750
  217. 1760  if y$ = "n" or y$ = "N" then 1890
  218. 1770  if y$ = "e" or y$ = "E" then 790
  219. 1780  if y$ = "d" or y$ = "D" then 1800
  220. 1790  goto 1750
  221. 1800  print at (5,12) ; "                                                           "
  222. 1805  sp$ = "are you sure you want to delete this file?" : gosub 181
  223. 1810  print at (5,12); "Are you sure you want to delete this file (y/n) "
  224. 1820  get y1$ : if y1$ = "" then 1820
  225. 1830  if y1$ = "n" or y$ = "N" then 1890
  226. 1840  if y1$ = "y" or y1$ = "Y" then 1860
  227. 1850  goto 1810
  228. 1860  rem do it here
  229. 1870  ff$ = "delete " + d$ + a$(del)
  230. 1880  shell ff$
  231. 1890  print at (5,12) ;"                                                       " : next del
  232. 1910  shell "delete ddirfile"
  233. 1920  goto 790
  234. 1930  rem directory
  235. 1940  scnclr
  236. 1945  sp$ = "disk directory." : gosub 181
  237. 1950  print at (35,0);inverse(1) "Disk Directory"
  238. 1955  sp$ = "type in the drive number!" : gosub 181
  239. 1960  print at (5,2) ; "Type in the drive number ie (df0: or df1:) or (e) to exit";
  240. 1970  input d1$
  241. 1980  if d1$ = "e" or d1$ = "E" then 790
  242. 1990  if d1$ = "df0:" or d1$ = "DF0:" or d1$ = "df1:" or d1$ = "DF1:" then 2010
  243. 2000  goto 1960
  244. 2005  sp$ = "directory of " + d1$ + " is " : goto 181
  245. 2010  print at (20,8) ;"Directory of ";d1$
  246. 2020  df$ = "dir " + d1$
  247. 2030  shell df$
  248. 2035  sp$ = "type any key to return to menu!" : gosub 181
  249. 2040  ? : ? "Type any key to return to menu ";
  250. 2050  get y$ : if y$ = "" then 2050
  251. 2060  goto 790
  252. 2070  rem print a file out
  253. 2080  scnclr
  254. 2085  sp$ = "send a file to the printer!" : gosub 181
  255. 2090  print at (35,0);inverse(1) "Send a file to the printer"
  256. 2100  print at (5,8); "                                                    "
  257. 2110  print at (5,5) ; "                                                          "
  258. 2120  print at (5,5) ; "Type in name of the file (e) to exit ";
  259. 2125  sp$ = "type in the name of the file or e to exit!" : gosub 181
  260. 2130  input pr$
  261. 2140  if pr$ = "e" or pr$ = "E" then 790
  262. 2145  sp$ = "are you sure you want to print this file." : gosub 181
  263. 2150  print at (5,8); "Are you sure you want to print this file (y/n)
  264. 2160  get y$ : if y$ = "" then 2160
  265. 2170  if y$ = "n" or y$ = "N" then 2100
  266. 2180  if y$ = "y" or y$ = "Y" then 2200
  267. 2190  goto 2160
  268. 2200  x$ = "copy " + pr$ + " par:" 
  269. 2210  shell x$
  270. 2220  sleep 1000000
  271. 2230  goto 790
  272. 2240  scnclr : sp$ = "we will see you later." : gosub 181
  273. 2245  end
  274.